package com.kinyx.framework.db.daos;

import org.junit.Test;

import com.kinyx.framework.db.sentence.str.SQL;
import com.kinyx.framework.log.Logger;
import com.kinyx.test.entities.impl.DemoEntity;

@SuppressWarnings("deprecation")
public abstract class JDBCDao_Tester_DaoParam extends SUPER {

	SQL sql = new SQL().x("SELECT * FROM T_DEMO WHERE ID = ?", null);

	@Test
	public void test_null() {
		this.logger.debug("test_null");
		this.dao.queryOne(null, this.sql, DemoEntity.class);
	}

	@Test
	public void test_empty() {
		this.logger.debug("test_empty");
		this.dao.queryOne(new DaoParam(null), this.sql, DemoEntity.class);
	}

	@Test
	public void test_logger() {
		this.logger.debug("test_logger");
		this.dao.queryOne(new DaoParam(Logger.getLog(this.getClass())), this.sql, DemoEntity.class);
	}

	@Test
	public void test_transaction() {
		this.logger.debug("test_transaction");
		this.dao.queryOne(new DaoParam(null).transaction(true), this.sql, DemoEntity.class);
	}

	@Test
	public void test_logger_transaction() {
		this.logger.debug("test_logger_transaction");
		this.dao.queryOne(new DaoParam(Logger.getLog(this.getClass())).transaction(true), this.sql, DemoEntity.class);
	}

}
